// MainFrm.h : interface of the CMainFrame class
//


#pragma once

#include "MapLayerExplorerDlg.h"
#include "MapLayerMgr.h"

class CMapLayerExplorerDlg;

class CMainFrame : public CFrameWnd
{
	
protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)
    void OnMaplayerAction(CMapLayerMgr* sender ,MapLayerAction* para);

// Attributes
public:

// Operations
public:

// Overrides
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;
	CToolBar    m_wndToolBar;

    CMyCDynamicBar	m_wndDlgBar;
// Generated message map functions
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	DECLARE_MESSAGE_MAP()
    void addMaplayer(CMapLayer* pMapLayer);
    void deleteMaplayer(CMapLayer* pMapLayer);
};

class CMapLayerActionHandler_MainFrame:public CMapLayerActionHandler
{
    typedef void(CMainFrame::*MapActionFunc)(CMapLayerMgr* sender,MapLayerAction* para);
    MapActionFunc mapActionFunc;
public:
    CMapLayerActionHandler_MainFrame(CMainFrame* pMainFrame);
    CMainFrame* m_pMainFrame;
    void HandleEvent(CMapLayerMgr* sender ,MapLayerAction* para);
    friend class CMainFrame;
};


